#ifndef CMPMNGR_H
#define CMPMNGR_H

/***********************************
Compare Manager - 
This file implements the GDiff07 algorithm, developed by Harley Green for 
The University of Southern California Center for Systems and Software Engineering (USC CSSE), 
in conjunction with The Aerospace Corporation.
The GDiff07 algorithm breaks the counting process for finding differences between two revisions of a file
into several steps. First it counts and removes all unmodified lines during this process lines that are 
not matched are put into a seperate list for each of the two files. 
These lists are then searched for swapped lines (DISABLED)
and have those removed. Then the remaining lines are searched again for modified matches. Once the unmodified, swapped 
and modified lines are removed the only remaining lines will be either added or deleted so no further action is necessary 
and the algorithm is finished.
Uses function for finding a similar line provided by J. Kim 10/09/2006 as part of the USC CSSE Development process.
************************************/

#include "cc_main.h"

using namespace std;

class CmpMngr
{
private:
	void find_unmodified_lines(srcLineVector *aHm,srcLineVector *bHm);
	bool similar_line(string baseLine, string compareLine);
	double MATCH_THRESHOLD;
	void find_modified_lines(srcLineVector* aHm,srcLineVector* bHm);
	typedef list<string> stringList;
	typedef map<int,stringList> stringSizeMap;

public:
	void compare(srcLineVector* baseFileMap,srcLineVector* compFileMap, double match_threshold);
	int nAddedLines;
	int nDeletedLines;
	int nChangedLines;
	int nNochangedLines;
};

#endif

